﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Devotit.Umbraco.MvcBridge.Web
{

    class OverrideRequestHttpContextWrapper : HttpContextWrapper
    {
        private readonly HttpContext _httpContext;
        private string _method = "GET";
        public OverrideRequestHttpContextWrapper(HttpContext httpContext, string method)
            : base(httpContext)
        {
            _method = method;
            _httpContext = httpContext;
        }

        public override HttpRequestBase Request
        {
            get { return new OverrideHttpMethodHttpRequestWrapper(_httpContext.Request, _method); }
        }
    }

}